package com.godofball.todo.entity.utils;


public enum AppHttpCodeEnum {
    // 成功
    SUCCESS(200, "操作成功"),
    // 登录
    NEED_LOGIN(401, "请进行登录后操作"),
    //登录过期
    LOGIN_OVERDUE(401, "登录过期，请重新登录"),
    NO_OPERATOR_AUTH(403, "无权限操作"),
    TASK_NO_EXIST(404,"任务未找到"),

    SYSTEM_ERROR(500, "出现错误"),

    REQUIRE_USERNAME(504, "必需填写用户名"),

    TASK_TITLE_EXIST(504, "任务标题在当前代办数据中已存在"),

    REQUIRE_TIME(504, "缺少开始时间或结束时间"),

    REQUIRE_PASSWORD(504, "必需填写用户密码"),
    LOGIN_ERROR(505, "用户名或密码错误");

    int code;
    String msg;

    AppHttpCodeEnum(int code, String errorMessage) {
        this.code = code;
        this.msg = errorMessage;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
